#ifndef __BLUETOOTH_H__
#define __BLUETOOTH_H__

#include "main.h"

// |PB01|  UART2->TX|  PB00|  UART2->RX|
//baudrate 9600

#define PACK_HEAD  0xA5
#define PACK_TAIL  0x5A

#define BOOL_NUM    1
#define BYTE_NUM    4
#define SHORT_NUM   0
#define INT_NUM     0
#define FLOAT_NUM   0
#define TOTAL_LENTH  (BOOL_NUM + BYTE_NUM + SHORT_NUM*2 + INT_NUM*4 + FLOAT_NUM*4)



typedef struct 
{
    uint8_t mBool[BOOL_NUM];
    int8_t mInt8[BYTE_NUM];
    // int16_t mInt16[SHORT_NUM];
    // int32_t mInt32[INT_NUM];
    // float mFloat[FLOAT_NUM];
}BluePack_t;

extern BluePack_t bluePack;

void BlueInit(void);
void BlueGetData(uint8_t info);
void BlueHandler(uint16_t cycle);

#endif

